package com.hdaccp.beike

import org.apache.spark.sql.SparkSession

/**
  * 创建DataFrame
  */
object Demo3 {
  def main(args: Array[String]): Unit = {
      //1.
    val spark = SparkSession.builder()
      .appName("beikeDemo3App")
      .master("local[2]")
      .getOrCreate()
    import spark.implicits._

    val personDataFrame = Seq(Person("张三",21)).toDF()

    personDataFrame.show()


    spark.stop()
  }
}

case  class Person(name:String,age:Int)
